import Taro, { Component } from '@tarojs/taro'
import Index from './pages/index'

import './colorui/main.wxss'
import './colorui/icon.wxss'

import './utils/ald-stat/ald-stat'
import './app.less'

// 如果需要在 h5 环境中开启 React Devtools
// 取消以下注释：
// if (process.env.NODE_ENV !== 'production' && process.env.TARO_ENV === 'h5')  {
//   require('nerv-devtools')
// }

class App extends Component {




  componentDidMount() {
    if (process.env.TARO_ENV === 'weapp') {
      Taro.cloud.init({
        //  env:'dev-d62d0'
      })
    console.log(Taro)
    }
  }

  componentDidShow() { }

  componentDidHide() { }

  componentDidCatchError() { }
  config = {
    pages: [
     
      'pages/index/index',
      'pages/me/index',
      'pages/list/index',
      'pages/detail/index',
      'pages/about/index',
      'pages/backups/index',
      'pages/history/index', 
    ],
     
    tabBar: {
      list: [
        {
          "pagePath": "pages/index/index", 
          "iconPath": "assets/img/home.png",
          "selectedIconPath": "assets/img/home-1.png",
          "text": "我的RSS"
        },
        {
          "pagePath": "pages/backups/index",
          "iconPath": "assets/img/sub.png",
          "selectedIconPath": "assets/img/sub-1.png",
          "text": "云备份"
        },
        {
          "pagePath": "pages/me/index",
          "iconPath": "assets/img/my.png",
          "selectedIconPath": "assets/img/my-1.png",
          "text": "我的"
        }
      ]
    },
    window: {
      backgroundTextStyle: 'light',
      navigationBarBackgroundColor: '#fff',
      navigationBarTitleText: 'WeChat',
      navigationBarTextStyle: 'black'
    },
    cloud: true
  }
  // 在 App 类中的 render() 函数没有实际作用
  // 请勿修改此函数
  render() {
    return (
      <Index />
    )
  }

}

Taro.render(<App />, document.getElementById('app'))
